The ObjGen Application Object contains a very powerful feature called 'Auto Build'. It is accessible from within the Application object edit window under the 'Auto Build' tab. Here, you may automatically create multiple Class and Form objects for your Application based on the tables and views defined in the Project's current database object. For every table or view name selected in the table listbox, a corresponding Application object is created based on the Auto Build options you select.
You may choose to create a Class object for each table selected and a Data Form that uses the new Class. Data Forms can also be created using In-Line SQL syntax if you prefer. You may also select an option to automatically create Master/Detail Data Forms for all tables that have a foreign key lookup to the selected table.
By default, buttons are created on the Form to navigate the data in the table and to perform reads and writes of table data. Form objects connected to database views do not support row insertion, deletion or updates.
When using the default code generator and not code templates, two different data access strategies are possible when creating Data Forms. By default the initial Form definition's data access strategy is to use In-Line embedded SQL. In other words all query syntax is generated directly into the Form object's definition. While this approach may be used in certain situations, we recommend using Application Data Class objects for handling all table access operations.
When the Form's data access strategy is set to 'Use Application Data Classes' the list of available record sources will contain all defined Application Class Objects that have a link to the current Database object. When a particular Class Object is selected as the record source, its list of available properties which are views of the class object's underlying table are available for defining display fields in the Form object. Subsequently, the 'Detail Record' tab will contain only those class objects that are defined in the Application that link to the current primary class object's underlying table. For more information on Class Objects, please see Classes.
If your project has been defined to use code templates, ObjGen will automatically load the corresponding code template as defined in the current framework for your application. You may load a custom code template from the Form's code window.
ObjGen supports the creation of powerful Data Classes that let you build a library of reusable objects that provide full access to your database tables. To create a class object you can right click in the Project viewer or click the 'Add Class' toolbar button. To edit the class definition select the Class object in the Project viewer. The Class edit definition view allows you to specify which table your class will implement full data access for. You may also define which columns in the table will become public properties of the Class that provide input and output to users of the class in the target Application.
If your project has been defined to use code templates, ObjGen will automatically load the corresponding code template as defined in the current framework for your application. You may load a custom code template from the Class code window.
You can also create empty window templates that will be available for you to customize once the target Application is generated.
You can also create stub modules that will be available for you to customize once the target Application is generated.